package com.hedl.practice.diyJava.multithreading.Interrupt_thread.practice.example1.entity;

/**
 * @author Big Watermelon
 * @description
 * @date 2024/02/20/08:57
 */
public class MyThread extends Thread{
    @Override
    public void run(){

        Thread thread = new HelloThread();
        thread.start();

        try {

            thread.join();

        } catch (InterruptedException e) {
            System.out.println("interrupted!");
        }finally {

            thread.interrupt();

        }
    }
}
